package com.wu.project.admin.entity;

import java.io.Serializable;
import java.sql.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * @author xuan
 */
public class UserEntity implements Serializable {

    /**
     * 用户id
     */
    private Long uid;
    /**
     * 登录名，不可改
     */
    private String uname;
    /**
     * 用户昵称，可改
     */
    private String nick;
    /**
     * 已加密的登录密码
     */
    private String pwd;
    /**
     * 加密盐值
     */
    private String salt;
    /**
     *  创建时间
     */
    private Date created;
    /**
     * 修改时间
     */
    private Date updated;
    /**
     * 用户所有角色值，用于shiro做角色权限的判断
     */
    private final Set<String> roles = new HashSet<>();
    /**
     * 用户所有权限值，用于shiro做资源权限的判断
     */
    private final Set<String> perms = new HashSet<>();

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getUname() {
        return uname;
    }

    public void setUname(String uname) {
        this.uname = uname;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public Set<String> getRoles() {
        return roles;
    }

    public Set<String> getPerms() {
        return perms;
    }
}
